package com.sofwin.configer;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.oas.annotations.EnableOpenApi;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;

/**
 * ClassName: SwaggerConfiger
 * Description: TODO
 * date: 2022/4/26 2:49 下午
 *
 * @author andyliu
 * @qq 115176513
 * @since JDK 1.8
 */
@Configuration
public class SwaggerConfiger {

    @Bean
    public Docket createDocket(){
        return new Docket(DocumentationType.SWAGGER_2)
                .enable(true)
                .apiInfo(getApiInfo())
                .select()
                .build();
    }
    public ApiInfo getApiInfo(){
        return new ApiInfoBuilder()
                .title("基于RBAC的权限管理系统接口文档")
                .description("用于接口说明")
                .contact(new Contact("andy","www.sofwiin.cn","115176513@qq.com"))
                .version("1.0.0")
                .build();
    }
}
